﻿@using Nop.Core.Domain.Common
@using Logistics.Web.Models.Shipment
@model CancelShipmentModel

<div class="section-wrapper">
    @if (Model.Success)
    {
        <p>Your package (Tracking Number <strong>@Model.TrackingNumber</strong>) has been cancelled successfully.</p>
        <input type="button" class="btn btn-normal shipment-action-back-button" value="Back to Package" />
    }
    else if (Model.Confirm)
    {
        using (Html.BeginForm("Cancel", "Shipment", new { area = "Logistics" }))
        {
            <p>Your are about to cancel this package package (Tracking Number <strong>@Model.TrackingNumber</strong>). Are you sure you want to continue?</p>
            <input type="button" value="Yes" class="btn btn-danger" data-action="submit" data-name="@Html.NameFor(model => model.Confirm)" data-value="true" />
            <input type="button" value="No, Back to Package" class="btn btn-normal shipment-action-back-button" />
            @Html.HiddenFor(model => model.ShipmentId)
        }
    }
    else
    {
        <p>You are unable to cancel this package.</p>
        <input type="button" value="Back to Package" class="btn btn-normal shipment-action-back-button" />
    }
</div>